/**
 * 代号:金花 
 * 文件名：FactoryProducer.java
 * 创建人：jh
 * 日期：2018年8月28日
 * 修改人：
 * 描述：
 */
package cc.pattern.shapeColor.getFactory;
/**
 * 用途：factory 工厂
 */

import cc.pattern.shapeColor.abs.AbstractFactory;
import cc.pattern.shapeColor.factory.ColorFactory;
import cc.pattern.shapeColor.factory.FootFactory;
import cc.pattern.shapeColor.factory.ShapeFactory;

public class FactoryProducer {
	public static AbstractFactory getFactory(String item) {
		AbstractFactory abs = null;
		switch (item) {
		case "Shape":
			abs = new ShapeFactory();
			break;
		case "Color":
			abs = new ColorFactory();
			break;
		case "Foot":
			abs = new FootFactory();
			break;
		default:
			break;
		}
		return abs;
	}
}
